using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

namespace Login.Server
{
    public class DefaultButtonSelector : MonoBehaviour
    {
        public Button defaultButton;

        private void Start()
        {
            // 检查默认按钮是否为空
            if (defaultButton != null)
                // 设置默认按钮为选中状态
                EventSystem.current.SetSelectedGameObject(defaultButton.gameObject);
        }
    }
}